import 'dart:io';

void main(List<String> args) {
  //1111
  print('开始执行main函数1111');
  //3333
  hahaha().then((res1) {
    print('then方法执行' + res1);
    return hahaha();
  }).then((res2) {
    print('then方法执行' + res2);
    return hahaha();
  }).then((res3) {
    print('then方法执行' + res3);
    return hahaha();
  });
  //22222
  print('开始执行main函数2222');
}

Future hahaha() {
  return Future(() {
    sleep(Duration(seconds: 3));
    print('object');
    return '返回数据 xxx';
  });
}
